The basis for programming and configuring programmable logic controllers (PLC) can be, for example, the device-independent programming system according to the international standard IEC 61131-3 with the programming languages described there. Programming environments for programmable logic controllers can also allow the use of high-level languages such as BASIC, Java, C or C/C++/C#.
The programming and configuration of the programmable logic controllers can be implemented by means of a PC-based programming tool or programming device, also called engineering tool, as a sequence of individual program instructions, technologically or functionally associated program instructions in each case forming one program module, also called function block.
A complete PLC program can contain a multiplicity of such program modules. The modules can be input in one of the aforementioned PLC-application-related programming languages, for example, as an instruction list, as a contact plan, as a logic plan, as a function plan, as a sequence language or a structured text via the programming tool. There are PC-based tools for creating, translating, checking and downloading the PLC code into the devices of the automation system.
A method for inputting the program instructions in the high-level language “C” is, for example, described in EP 860 758 A1. An input device of the programming device is shown, which can be connected via a first data line to a converting device and can be connected via a second data line to a high-level language compiler, which can translate the program instructions into a code, which can be read or processed by the programmable logic controller.
On the product page of the company Bernecker+Rainer Industrie-Elektronik GmbH-B&R Automation Studio: “Integrated IEC 61131-3 Languages, CFC and ANSI-C” (see www.br-automation.com/cps/rde/xchg/br-productcatalogue/hs.xsl/products—151728 ENG HTML.htm), it is described that the programming language ANSI C can allow the users to call up function blocks and access addresses (global access variable) from other IEC languages.
Furthermore, there are solutions in which various source-file languages such as, for example, IEC61131, C/C++/C#, Basic or Java can be translated into an intermediate code and the intermediate code can then be retranslated in accordance with the producer-related target platforms of the devices used by means of an additional software component. This solution can be used, for example, by the company KW Software of the Phoenix Contact Gruppe and is shown by way of example in FIG. 1.
A further solution relates to the runtime system of the programmable logic controller according to IEC61131. In this context, the C Code functions can only call up variables with the programs described in IEC61131-3. Access to the system resources such as inputs and/or outputs or the memories of the devices connected to the programmable logic controller is not provided.